package com.springboot2.security.entity.po;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.util.Set;

@TableName("t_user")
@Data
public class UserInfo {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String userName;
    private String password;
    private Set<RoleInfo> roles;

    private Set<String> permissions;

    public UserInfo(String username, String password) {
        this.userName = username;
        this.password = password;
    }
}